package com.anycl.design.structural.decorator;

/**
 * 装饰器模式
 */
public class Main {

    public static void main(String[] args) {
        MediaPlay mediaPlay = new VideoPlay("虹猫蓝兔七侠传", "虹猫蓝兔七侠聚集");

        MediaPlay mediaPlayWithBarrage = new BarrageReadVideoPlay(mediaPlay);
        mediaPlay.play();
        mediaPlayWithBarrage.play();

        D3 d3Play = new D3Play(mediaPlayWithBarrage);
        d3Play.play();
    }
}
